Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Attempt to read property base on null #4060

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Fix: Attempt to read property base on null #4060

merged 2 commits into from
Jan 14, 2025

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes an issue where a warning is thrown when protected content is enabled and WP_Query runs in the AJAX callback

Closes #4059

How to test the Change

  1. Enable the protected content feature.
  2. Add add_filter( 'ep_ajax_wp_query_integration', '__return_true' ); filter
  3. Call the WP_Query with a search parameter and ensure the orderby parameter is empty in the ajax callback function

Changelog Entry

Fixed - Attempt to read property "base" on null

Credits

Props @burhandodhy @yarovikov

Checklist:

@burhandodhy burhandodhy added this to the 5.2.0 milestone Jan 14, 2025
@felipeelia felipeelia merged commit d595a6a into develop Jan 14, 2025
22 checks passed
@felipeelia felipeelia deleted the fix/4059 branch January 14, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Attempt to read property "base"
2 participants